$success: #449d44;

$primary-web: #04cabc;
$primary-app: #4AA3F3;
$error-app: #fb6a7d;
$border: #ebedf0;

$diabled: #ccc;

$error-web: #c30;

$navBarHeight: 92px;
$fromEdgeWidth: 26px;

/* #region 答题页变量*/
  /* #region app 变量*/
  $examHeaderInAPP: 80px;
  $examFooterInAPP: 114px;
  /* #endregion */

  /* #region m站变量*/
  // $examHeaderInH5: 107px;
  $examHeaderInH5: 123px;
  $examFooterInH5: 98px;
  /* #endregion */
/* #endregion */

$exerciseHeader: 70px;

@mixin ellipsis($lines: 1) {
  @if $lines != 1 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $lines;
    -webkit-box-orient: vertical;
  } @else {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

@mixin active($bgc: #000) {
  position: relative;
  user-select: none;
  &::before {
    content: " ";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border: inherit;
    border-radius: inherit;
    background: $bgc;
    opacity: 0;
  }
  &:active::before {
    opacity: 0.1;
  }
  &.disabled::before {
    display: none;
  }
}

@mixin iosScroll {
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  &::after {
    position: absolute;
    right: 0;
    top: 0;
    content: '';
    width: 1px;
    height: calc(100% + 1px);
  }
}

@mixin themeColor($properties, $errorProperties: null) {
  @if $properties != width {
    @each $property in $properties {
      #{$property}: $primary-web;
    }
  }
  @if length($errorProperties) > 0 {
    @each $property in $errorProperties {
      #{$property}: $error-web;
    }
  }
  // /deep/ {
  //   .has-header & {
  //     @if $properties != width {
  //       @each $property in $properties {
  //         #{$property}: $primary-app;
  //       }
  //     }
  //     @if length($errorProperties) > 0 {
  //       @each $property in $errorProperties {
  //         #{$property}: $error-app;
  //       }
  //     }
  //   }
  // }
}

@mixin px1border($direction: bottom, $color: #eaeaea) {
  @if $direction == all {
    border: 1px solid $color;
  } @else {
    border-#{$direction}: 1px solid $color;
  }
  /deep/ {
    .hairlines & {
      border-width: 0.5px;
    }
  }
}

@mixin px1bd($direction: bottom, $color: #eaeaea) {
  position: relative;
  &::after {
    content: '';
    position: absolute;
    pointer-events: none;
    box-sizing: border-box;
    top: -50%;
    bottom: -50%;
    left: -50%;
    right: -50%;
    transform: scale(0.5);
    border: 0 solid $color;
    // @if $borderRadius != 0 {
    //   border-radius: $borderRadius;
    // }
    @if $direction == all {
      border-width: 1px;
    } @else {
      border-#{$direction}-width: 1px;
    }
  }
}


// @mixin tc-middle {
//   display: table-cell;
//   vertical-align: middle;
// }
// @mixin va-middle {
//   &::before {
//     content: "";
//     display: inline-block;
//     vertical-align: middle;
//     height: 100%;
//     width: 0;
//   }
//   .vam {
//     display: inline-block;
//   }
// }
@mixin flex-middle($inline: 0) {
  display: if($inline == 1, inline-flex, flex);
  align-items: center;
}
